# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libaccounts-glib
pkgver=1.26
pkgrel=2
arch="all"
url="https://gitlab.com/accounts-sso/libaccounts-glib"
pkgdesc="GLib-based client library for the accounts database"
license="LGPL-2.1-or-later"
depends_dev="
	check-dev
	gobject-introspection-dev
	libxml2-dev
	py3-gobject3
	sqlite-dev
	"
makedepends="$depends_dev
	glib-dev
	gtk-doc
	meson
	ninja
	python3
	vala
	"
source="https://gitlab.com/accounts-sso/libaccounts-glib/-/archive/VERSION_$pkgver/libaccounts-glib-VERSION_$pkgver.tar.gz"
subpackages="$pkgname-dev $pkgname-doc"
options="!check" # Requires a systemd feature
builddir="$srcdir/$pkgname-VERSION_$pkgver"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
c08a11087745ba771e539b61de57693390960ad6b4e8217c159be49d31bd7f8856fffa835e7a230f352049bbf7cec9184ff225e74bbc195964221d3d9d49743b  libaccounts-glib-VERSION_1.26.tar.gz
"
